﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Shop : System.Web.UI.Page
{
    Funtion ft = new Funtion();
    protected void Page_Load(object sender, EventArgs e)
    {
        imgBanner.Src = "images/Image/header_images.jpg";
        lblTitle.Text = ft.LoadNews("N02").Title.ToString();
        lblNews1.Text = ft.LoadNews("N02").NewsFile.ToString();
        lblTitle2.Text = ft.LoadNews("N03").Title.ToString();
        lblNew2.Text = ft.LoadNews("N03").NewsFile.ToString();
        if(this.IsPostBack == false)
        {
        lblTitle1.Text = ft.LoadNews("SN01").Title.ToString();
        lblShow.Text = ft.LoadNews("SN01").NewsFile.ToString();
        imgNews.ImageUrl = "images/"+ft.getImage("SN01","SN01")+"";
        imgNews0.ImageUrl = "images/" + ft.getImage("SN01", "SN02") + "";
        imgNews1.ImageUrl = "images/" + ft.getImage("SN01", "SN03") + "";
        imgNews2.ImageUrl = "images/" + ft.getImage("SN01", "SN04") + "";
        lbtnShop.ForeColor = System.Drawing.Color.Red;
        lbtnShop.CssClass = "active";
        }

    }
    protected void lbtnFood_Click1(object sender, EventArgs e)
    {
        lblTitle1.Text = ft.LoadNews("ZN01").Title.ToString();
        lblShow.Text = ft.LoadNews("ZN01").NewsFile.ToString();
        imgNews.ImageUrl = "images/" + ft.getImage("ZN01", "ZN01") + "";
        imgNews0.ImageUrl = "images/" + ft.getImage("ZN01", "ZN02") + "";
        imgNews1.ImageUrl = "images/" + ft.getImage("ZN01", "ZN03") + "";
        imgNews2.ImageUrl = "images/" + ft.getImage("ZN01", "ZN04") + "";
        lbtnShop.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnCinema.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnFood.ForeColor = System.Drawing.Color.Red;
        lbtnGallery.ForeColor = System.Drawing.Color.SkyBlue;
    }
    protected void lbtnGallery_Click1(object sender, EventArgs e)
    {
        lblTitle1.Text = ft.LoadNews("GN01").Title.ToString();
        lblShow.Text = ft.LoadNews("GN01").NewsFile.ToString();
        imgNews.ImageUrl = "images/" + ft.getImage("GN01", "GN01") + "";
        imgNews0.ImageUrl = "images/" + ft.getImage("GN01", "GN02") + "";
        imgNews1.ImageUrl = "images/" + ft.getImage("GN01", "GN03") + "";
        imgNews2.ImageUrl = "images/" + ft.getImage("GN01", "GN04") + "";
        lbtnShop.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnCinema.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnFood.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnGallery.ForeColor = System.Drawing.Color.Red;
    }
    protected void lbtnShop_Click1(object sender, EventArgs e)
    {
        lblTitle1.Text = ft.LoadNews("SN01").Title.ToString();
        lblShow.Text = ft.LoadNews("SN01").NewsFile.ToString();
        imgNews.ImageUrl = "images/" + ft.getImage("SN01", "SN01") + "";
        imgNews0.ImageUrl = "images/" + ft.getImage("SN01", "SN02") + "";
        imgNews1.ImageUrl = "images/" + ft.getImage("SN01", "SN03") + "";
        imgNews2.ImageUrl = "images/" + ft.getImage("SN01", "SN04") + "";
        lbtnShop.ForeColor = System.Drawing.Color.Red;
        lbtnCinema.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnFood.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnGallery.ForeColor = System.Drawing.Color.SkyBlue;
    }
    protected void lbtnCinema_Click1(object sender, EventArgs e)
    {
        lblTitle1.Text = ft.LoadNews("CN01").Title.ToString();
        lblShow.Text = ft.LoadNews("CN01").NewsFile.ToString();
        imgNews.ImageUrl = "images/" + ft.getImage("CN01", "CN01") + "";
        imgNews0.ImageUrl = "images/" + ft.getImage("CN01", "CN02") + "";
        imgNews1.ImageUrl = "images/" + ft.getImage("CN01", "CN03") + "";
        imgNews2.ImageUrl = "images/" + ft.getImage("CN01", "CN04") + "";
        lbtnShop.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnCinema.ForeColor = System.Drawing.Color.Red;
        lbtnFood.ForeColor = System.Drawing.Color.SkyBlue;
        lbtnGallery.ForeColor = System.Drawing.Color.SkyBlue;
    }
}